using System;
using System.Collections.Generic;
using System.Text;
using SlimDX;
using SlimDX.Direct3D9;

namespace TileGert
{
  /// <summary>
  /// GertSprite is a simple sprite with an Image and a Position.
  /// </summary>
  public class GertSprite
  {
    /// <summary>
    /// The internal name of the image associated with this sprite.
    /// </summary>
    protected string _image = "";
    /// <summary>
    /// The position of the top left corner of the sprite.
    /// </summary>
    protected GertPoint _position = new GertPoint();

    /// <summary>
    /// Creates a new GertSprite with no Image at (0, 0).
    /// </summary>
    public GertSprite()
    {
    }

    /// <summary>
    /// Creates a new GertSprite with the given image at (0, 0).
    /// </summary>
    /// <param name="image">The image assigned to this GertSprite.</param>
    public GertSprite(string image)
    {
      _image = image;
    }

    /// <summary>
    /// Creates a new GertSprite with the given image at the given position.
    /// </summary>
    /// <param name="image">The image assigned to this GertSprite.</param>
    /// <param name="x">The X coordinate in world space.</param>
    /// <param name="y">The Y coordinate in world space.</param>
    public GertSprite(string image, float x, float y)
    {
      _image = image;
      _position.X = x;
      _position.Y = y;
    }
    
    /// <summary>
    /// Gets or sets the image to be rendered.
    /// </summary>
    public string Image
    {
      get { return _image; }
      set { _image = value; }
    }

    /// <summary>
    /// Gets or sets the world space position.
    /// </summary>
    public GertPoint Position
    {
      get { return _position; }
      set { _position = value; }
    }
    
  }
}
